Skip to content

[macOS] Enable TextField borders on macOS 26#3289

Open
SougandhS wants to merge 1 commit into
eclipse-platform:masterfrom
SougandhS:MacTextBorder
Open

[macOS] Enable TextField borders on macOS 26#3289
SougandhS wants to merge 1 commit into
eclipse-platform:masterfrom
SougandhS:MacTextBorder

Conversation

@SougandhS
Copy link
Copy Markdown

Restore visible borders for SWT text controls on macOS 26 and later to improve control visibility and readability.

Part of #3286 and eclipse-platform/eclipse.platform.ui#3885

Before [Light]
Screenshot 2026-05-07 at 5 24 23 PM

After[Light]
Screenshot 2026-05-07 at 5 25 09 PM

Before [Dark]
Screenshot 2026-05-07 at 5 26 01 PM

After [Dark]
Screenshot 2026-05-07 at 5 26 23 PM

Restore visible borders for SWT text controls on macOS 26 and later to
improve control visibility and readability.

Part of eclipse-platform#3286
and eclipse-platform/eclipse.platform.ui#3885
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

Test Results (macos)

   58 files  ±0     58 suites  ±0   6m 2s ⏱️ -6s
4 571 tests ±0  4 324 ✅ ±0  247 💤 ±0  0 ❌ ±0 
2 202 runs  ±0  2 138 ✅ ±0   64 💤 ±0  0 ❌ ±0 

Results for commit 81353d1. ± Comparison against base commit 24b4c49.

@Phillipus
Copy link
Copy Markdown
Contributor

Phillipus commented May 7, 2026

Is this PR intended to be merged after the Equinox launcher is compiled with macOS 26 SDK? This checks only the running macOS version so Text controls on macOS 26 that have SWT.BORDER style now look different:

Before this PR (correct border style):

before

After this PR:

after

@SougandhS
Copy link
Copy Markdown
Author

This checks only the running macOS version so Text controls on macOS 26 that have SWT.BORDER style now look different:

Is there any current build agent/ binary check APIs in SWT ?

@Phillipus
Copy link
Copy Markdown
Contributor

Phillipus commented May 8, 2026

Is there any current build agent/ binary check APIs in SWT ?

Not API. I think the idea as @HeikoKlare says is to build the equinox binary on macOS SDK 26 at some point in the future.

As mentioned in #3286 the idea is to fix problems that occur when running SWT or an app that consumes SWT (Eclipse, RCP app) from a binary that has been compiled with macOS 25 SDK. Right now this seems to be only the Homebrew Java 25. Eclipse is launched with the Equinox launcher compiled with macOS 15 SDK and most Java binaries with 14 or 15.

In this issue setting the Text control's border by checking whether the running macOS is macOS 26 or later will add an additional border in all cases.

@tobiasmelcher
Copy link
Copy Markdown
Contributor

@Phillipus @HeikoKlare We could use #3300 with method OS.getMachOSDKVersion to query the SDK version and set the borders only when necessary.

@HeikoKlare
Copy link
Copy Markdown
Contributor

Thank you for working on this.

Before discussing about technical details, I would like to raise the question if the proposed solution is actually what we intend to do. From my understanding, this is a workaround, isn't it? Enabling these borders around text widgets makes them visible, but not in a way that seems conforms to native look & feel. At least the dark colored border with non-rounded edges of the text fields shown in the screenshots is nothing I find in native look & feel.

From my understanding, prior to macOS 26 the native look & feel of text widgets comprised light borders and dark "underline", like you can see here in the native TextEdit settings dialog (and in every SWT application):
image

With macOS 26, the native look & feel of text widgets changed to using a light border with rounded edges, as you can see in the native TextEdit settings dialog:
image

It should be somehow possible to adopt that look & feel on both dark and light backgrounds, e.g., see this white background of the search field of the TextEdit application:
image

Maybe macOS provides further options to customize this look & feel. That I have not checked yet.

To adopt macOS 26 look & feel, maybe there are new configuration options to NSTextField that can/need to be set? In particular the configuration around the bezeled property might be interesting. Since the rounded border/bezel is present when building an SWT application against macOS 26 SDK, but it only seems to be cut off, maybe it is also about changed control default sizes or the like that need to be adapted in the SWT Text implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants